package com.xch.sboot.service.common.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

/**
 * @author xch
 * 2022/12/30 15:39
 */

@Data
@NoArgsConstructor
@ApiModel(description = "文件DTO")
public class FileDTO {
    @ApiModelProperty("主键id")
    private String id;

    @ApiModelProperty("源文件名称")
    private String oldname;

    @ApiModelProperty("文件类型")
    private String suffix;

    public FileDTO(Object source) {
        if (source != null) {
            BeanUtils.copyProperties(source, this);
        }
    }
}
